<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
     var arr = [
        ["第1条帖子","a","阿巴巴巴巴巴巴sssssssss巴吧"],
        ["第2条帖子","b","阿巴巴巴巴巴巴sssssss巴吧"],
        ["第3条帖子","c","阿巴巴巴巴巴ssssss巴巴吧"],
        ["第4条帖子","d","阿巴巴巴巴巴sss巴巴吧"],
        ["第5条帖子","e","阿巴巴巴巴sssss巴巴巴吧"]
    ]
    var tbHeight = "500px";
    var tbWidth = "800px";
    document.write("<table border='1' height='"+ tbHeight +"' width='"+ tbWidth +"'>");
    function createlist(arr){
        arr.forEach(function(el,i,arr1){
            document.write("<tr>");
                el.forEach(function(val,j,arr2){
                    if(j == 2){
                        arr[i][j] = arr[i][j].slice(0,5) + "......";
                    }
                    document.write("<td>");
                    document.write(arr[i][j]);
                    document.write("</td>");
                })
            document.write("</tr>");
        })
    }
    createlist(arr);
    document.write("</table>")
</script>
</html>